fix: don't show DEW approve error next step for auto-approval failures#96198
fix: don't show DEW approve error next step for auto-approval failures#96198abzokhattab wants to merge 4 commits into
Conversation
Restore the automaticAction check removed in Expensify#79165 so auto-approval blocks keep the normal workflow next step while manual approval failures still show the error banner to the current approver.
|
@Eskalifer1 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Hi! I will review it in a couple of hours 😃 |
|
its not ready for review yet sorry ... i am not sure if c+ is needed .. need to confirm with @sakluger |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Extract shouldShowDynamicExternalWorkflowApproveErrorNextStep so we can unit test that auto-approve failures keep the normal next step while manual failures still show the error banner for the current approver.
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
|
This is ready for review @sakluger .. Let us know if a C+ review would be needed |
|
@abzokhattab probably good to have a C+ review it. I see @Eskalifer1 is assigned to review it, that should be sufficient. |
|
Hi @sakluger, could you please add me to the workspace with DEW enabled(as stated in preconditions), so i could all test? My account is artemkryt1800+test2@gmail.com
|
|
Hi @sakluger gentle bump on comment above, thank you! |
Explanation of Change
Restores the
automaticActioncheck for DEW approve failure next steps that was accidentally removed in #79165. When DEW blocks auto-approval (DEW_APPROVE_FAILEDwithautomaticAction: true), the report should keep the normal workflow next step (e.g. "Waiting for A to approve the report"). The red error next step should only appear for manual approval failures (automaticAction: false) when the current user is the approver.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/652010
PROPOSAL:
Tests
Prerequisites:
GENERIC_CATEGORY_THRESHOLD_AUTO_APPROVALon the workspace (by default this DEW blocks all auto-approval)0%so the report would normally auto-approve without DEWTest 1: Auto-approve blocked by DEW (customer regression)
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Before
Screen.Recording.2026-07-17.at.01.54.11.mov
After
Screen.Recording.2026-07-17.at.01.54.20.mov